﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VitCode.Castle.DataAccess;
using VitCode.Castle.Helper;

namespace AMSInventoryWeb.BaseData
{
    public partial class SynchAMSData : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");
            if(!IsPostBack)
            {
                if (Request.Cookies["Code"] == null)
                {
                    Response.Redirect("../Default.aspx");
                }
            }
        }

        protected void btnSynData_Click(object sender, EventArgs e)
        {
            var Acc = new BaseDataAccess();
            int access =  Acc.ExecuteCmdByProcedureName("up_Init_Data");
            if(access > 0)
               Alert.MessageBox("执行成功!");

            }

  
     
    }
}
